package com.hn.gege.core.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 数据库操作记录
 * </p>
 *
 * @author zxy
 * @since 2022-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_database_record")
@ApiModel(value="DatabaseRecord对象", description="数据库操作记录")
public class DatabaseRecord implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "id")
    @TableField(fill = FieldFill.INSERT)
    private Long id;

    @ApiModelProperty(value = "批次号")
    private String batchNo;

    @ApiModelProperty(value = "业务表id", required = true)
    @NotNull
    private String bizId;

    @ApiModelProperty(value = "执行的sql", required = true)
    @NotBlank
    private String sqlTxt;

    @ApiModelProperty(value = "执行sql类型", required = true)
    @NotBlank
    private String sqlType;

    @ApiModelProperty(value = "执行的表名", required = true)
    @NotBlank
    private String tableName;

    @ApiModelProperty(value = "操作的数据")
    private String modifyData;

    @ApiModelProperty(value = "操作时间")
    private LocalDateTime createTime;

}
